package string;

public class Homework {
    public static void main(String[] args) {
        String path =  "http://localhost:8088/myweb/reg? name=zhangsan&pwd=123456&nick=san&age=16";
        String[] str = path.split("\\?");
        System.out.println("请求："+str[0]);
        System.out.println("请求："+str[1]);

        str = str[1].split("&");
        for (int i = 0; i < str.length; i++){
            String line = str[i];
            String[] arr = str[i].split("=");
            System.out.println("参数名："+arr[0]+"参数值："+arr[1]);
        }




    }
}
